using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Backend.JYD.Model.Cust;

namespace Backend.JYD.EFDAL.Mapping
{
    public class CustEstateMap : EntityTypeConfiguration<CustEstate>
    {
        public CustEstateMap()
        {
            // Primary Key
            this.HasKey(t => t.CustEstateId);

            // Properties
            this.Property(t => t.CustNo)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("CustEstate");
            this.Property(t => t.CustEstateId).HasColumnName("CustEstateId");
            this.Property(t => t.CustNo).HasColumnName("CustNo");
            this.Property(t => t.EstateId).HasColumnName("EstateId");
            this.Property(t => t.Portion).HasColumnName("Portion");
            this.Property(t => t.TaskId).HasColumnName("TaskId");
            this.Property(t => t.TaskDetailId).HasColumnName("TaskDetailId");
        }
    }
}
